package com.zzyl.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Dto基类
 */
@Data
@NoArgsConstructor
@SuperBuilder
public class BaseDto implements Serializable {
	@Serial
	private static final long serialVersionUID = 3133496665908021554L;
	/**
	 * 主键
	 */
	@ApiModelProperty(value = "主键")
	private Long id;
	
	/**
	 * 搜索值
	 */
	@JsonIgnore
	private String searchValue;
	
	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	private String remark;
	
	/**
	 * 请求参数
	 */
	@JsonIgnore
	private Map<String, Object> params;
	
	public Map<String, Object> getParams() {
		if (params == null) {
			params = new HashMap<>();
		}
		return params;
	}
	
	public void setParams(Map<String, Object> params) {
		this.params = params;
	}
	
}


